#ifndef __capture_h
#define __capture_h 1
#include "sys.h"
#include "log.h"
#include "net.h"
#include "socket.h"
#include "pcap_output.h"
#include "packet.h"
#include "hook.h"
#include "thread_pool.h"
#include "net_stack.h"
                      

typedef struct _capture{
    int raw_fd;
    struct hook *list;
    thread_pool_t *tp;
}Capture_t;

extern Capture_t *capture_new();
extern int capture_run(Capture_t *cap);
extern void capture_free(Capture_t *cap);
extern int capture_set_promisc(Capture_t *cap, char *ifName);
extern int capture_bind(Capture_t *cap, char *ifName);
#endif